<?php
     include_once('../../src/classes/class.mssql.php');
    
     $comtec_id_responsible = $_POST['comtec_id_responsible'];
     $token = $_POST['token']; 
     
     //TODO validar el token recibido por POST y el de la sesion.
     
     $db = new MSSQL();  
     $tsql = "UPDATE [dbo].[responsible] SET status_reg=0  WHERE 
              comtec_id_responsible=".$comtec_id_responsible;
     if($db->query($tsql))
     {  
      echo "<script>loadResponsibles();</script>";    
      //echo "<script>alert('Se ha eliminado el encargado exitosamente');</script>";
     } 
     else
     {
      echo '<p class="error">';
      echo "Error al eliminar el encargado \n";  
      echo '</p';              
     }
?>
